import os

import torch

from main import LaneDetectionNet, config, visualize_results

if __name__ == '__main__':

    model = LaneDetectionNet().to(config['device'])
    model.load_state_dict(torch.load('best_model.pth'))
    test_img = os.path.join(config['data_root'], 'clips/0313-2/75/1.jpg')  #'clips/0313-2/75/1.jpg'换成对应的测试图片的地址
    visualize_results(model, test_img)